<?php if(isset($isInsert) && $isInsert){
?>
<script>
	ajax('listContent','<?php echo $this->params['controller']?>/lists');
	closeBox('addContent','mainContent');
</script>
<?php
}else{
?>
<form id="adminForm" name="adminForm" method="post" action="<?php echo $this->params['controller']?>/edit/<?php echo $this->data[$uses[0]]['id'] ?>" onsubmit="onFormSubmit();return false;">
<fieldset>
    <legend><?php _resource('edit group');?></legend>
    <!--	show error and message -->

<center><div id="message" >&nbsp;</div></center>
<?php if($this->Session->read('error')){
	echo '<script>showMessage("addContent","'.$this->Session->read('error').'",1);</script>';
	$this->Session->delete('error');
}?>
    
    <?php
		echo $this->Form->hidden($uses[0].'.id');
		echo $this->Form->hidden($uses[0].'.last_login');
		echo $this->Form->hidden($uses[0].'.view_order');
		echo $this->Form->hidden($uses[0].'.published');
		echo $this->Form->hidden($uses[0].'.password');

	?>
	<table border="0" class="form" style="width:100%">
       	
        <tr>          
       		<td class="label" align="right" width="100px"><?php _resource('username') ?></td>
       		<td align="left"><?php echo $this->Form->input($uses[0].'.name',array('class'=>'input_require','label'=>'','size'=>60,'maxlength'=>255));?></td>           
        </tr>
        
	</table>
    
    
    <div style="width:130px;">
          <div class="button"><a onclick="onFormSubmit()" href="javascript:;" title="<?php echo _resource('save') ?>"  > <span class="icon-32-save"> </span></a> </div>         
          <div class="button"><a onclick="resetForm('adminForm')" href="javascript:;" title="<?php echo _resource('reset') ?>"  > <span class="icon-32-back"> </span></a> </div>
          <div class="button"><a onclick="closeBox('addContent','mainContent')" href="javascript:;" title="<?php echo _resource('close') ?>"  > <span class="icon-32-cancel"> </span></a> </div>
    </div>

	
    
    

</fieldset>
<?php if(!empty($groupAcoWebsite)){?>
<fieldset>
    <legend><?php _resource('website module permission');?></legend>
    <!--	show error and message -->
    <div id="groupPermission">
		<?php echo $groupAcoWebsite?>
		<div style="clear:both;">&nbsp;</div>
	</div>
	<div style="width:130px;">
          <div class="button"><a onclick="onFormSubmit()" href="javascript:;" title="<?php echo _resource('save') ?>"  > <span class="icon-32-save"> </span></a> </div>         
          <div class="button"><a onclick="resetForm('adminForm')" href="javascript:;" title="<?php echo _resource('reset') ?>"  > <span class="icon-32-back"> </span></a> </div>
          <div class="button"><a onclick="closeBox('addContent','mainContent')" href="javascript:;" title="<?php echo _resource('close') ?>"  > <span class="icon-32-cancel"> </span></a> </div>
    </div>
</fieldset>
<?php }?>
<fieldset>
    <legend><?php _resource('admin module permission');?></legend>
    <!--	show error and message -->
    <div id="groupPermission">
		<?php echo $groupAco?>
		<div style="clear:both;">&nbsp;</div>
	</div>
	<div style="width:130px;">
          <div class="button"><a onclick="onFormSubmit()" href="javascript:;" title="<?php echo _resource('save') ?>"  > <span class="icon-32-save"> </span></a> </div>         
          <div class="button"><a onclick="resetForm('adminForm')" href="javascript:;" title="<?php echo _resource('reset') ?>"  > <span class="icon-32-back"> </span></a> </div>
          <div class="button"><a onclick="closeBox('addContent','mainContent')" href="javascript:;" title="<?php echo _resource('close') ?>"  > <span class="icon-32-cancel"> </span></a> </div>
    </div>
</fieldset>
<?php if(!empty($groupAcoSystem)){?>
<fieldset>
    <legend><?php _resource('system module permission');?></legend>
    <!--	show error and message -->
    <div id="groupPermission">
		<?php echo $groupAcoSystem?>
		<div style="clear:both;">&nbsp;</div>
	</div>
	<div style="width:130px;">
          <div class="button"><a onclick="onFormSubmit()" href="javascript:;" title="<?php echo _resource('save') ?>"  > <span class="icon-32-save"> </span></a> </div>         
          <div class="button"><a onclick="resetForm('adminForm')" href="javascript:;" title="<?php echo _resource('reset') ?>"  > <span class="icon-32-back"> </span></a> </div>
          <div class="button"><a onclick="closeBox('addContent','mainContent')" href="javascript:;" title="<?php echo _resource('close') ?>"  > <span class="icon-32-cancel"> </span></a> </div>
    </div>
</fieldset>
<?php }?>

<?php echo $this->element('sql_dump');?>
</form>
<script>
function onFormSubmit(){
	submitForm('adminForm','addContent');
}
scrollTopTo('addContent');	
</script>
<?php } ?>

